Page({
  data: {
    banners: [
      "https://dcdn.it120.cc/2020/01/07/c3183558-55e8-4589-9ea7-81670004941a.jpg",
      "https://dcdn.it120.cc/2020/01/07/b7471e4f-dc0d-4245-afb7-b64fbd9bb29a.jpg",
      "https://dcdn.it120.cc/2020/01/07/5425289c-fb82-4ab4-a193-933ddba71496.jpg",
    ],
    swiperMaxNumber: 3,
    swiperCurrent: 0,
  },
  onLoad(e) {},
  onShow: function () {},
  swiperchange: function (e) {
    this.setData({
      swiperCurrent: e.detail.current,
    });
  },
  goToIndex: function (e) {
    wx.navigateTo({
      url: "/pages/index/index",
    });
  },
  imgClick() {
    if (this.data.swiperCurrent + 1 != this.data.swiperMaxNumber) {
      wx.showToast({
        title: "左滑进入",
        icon: "none",
      });
    }
  },
});
